/*
 * @Author: your name
 * @Date: 2020-10-14 15:24:16
 * @LastEditTime: 2022-01-27 15:15:59
 * @LastEditors: lsy
 * @Description: In User Settings Edit
 * @FilePath: \vue3-element-admin\vue.config.js
 */
const path = require("path");
const packageName = require('./package.json').name;
module.exports = {
    lintOnSave: false,
    publicPath: `/sub/${packageName}/`,
    devServer: {
        port: 8081,
        disableHostCheck: true,
        headers: {
            'Access-Control-Allow-Origin': '*',
        },
    },
    outputDir: path.resolve(__dirname, `./../outputDir/sub/${packageName}`),
    configureWebpack: {
        output: {
            // 微应用的包名，这里与主应用中注册的微应用名称一致
            library: packageName,
            // 将你的 library 暴露为所有的模块定义下都可运行的方式
            libraryTarget: 'umd',
            // 按需加载相关，设置为 webpackJsonp_VueMicroApp 即可
            jsonpFunction: `webpackJsonp_${packageName}`,
        }
    }
};